package com.sefford.circularprogressdrawable;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class CircularProgressDrawableTest {

    private static int RING_WIDTH = 15;
    private static int OUTLINE_COLOR = 16777184;
    private static int RING_COLOR = 19271841;
    private static int CENTER_COLOR = 11271821;

    @Test
    public void shouldSetRingWidth() {
        CircularProgressDrawable.Builder circularProgressDrawable = new CircularProgressDrawable.Builder();
        circularProgressDrawable.setRingWidth(RING_WIDTH);
        assertEquals(15, circularProgressDrawable.getRingWidth());
    }

    @Test
    public void shouldSetOutlineColor() {
        CircularProgressDrawable.Builder circularProgressDrawable = new CircularProgressDrawable.Builder();
        circularProgressDrawable.setOutlineColor(OUTLINE_COLOR);
        assertEquals(16777184, circularProgressDrawable.getOutlineColor());
    }

    @Test
    public void shouldSetRingColor() {
        CircularProgressDrawable.Builder circularProgressDrawable = new CircularProgressDrawable.Builder();
        circularProgressDrawable.setRingColor(RING_COLOR);
        assertEquals(19271841, circularProgressDrawable.getRingColor());
    }

    @Test
    public void shouldSetCenterColor() {
        CircularProgressDrawable.Builder circularProgressDrawable = new CircularProgressDrawable.Builder();
        circularProgressDrawable.setCenterColor(CENTER_COLOR);
        assertEquals(11271821, circularProgressDrawable.getCenterColor());
    }
}